home *** CD-ROM | disk | FTP | other *** search
/ Creating Your Own America Online Web Pages / Creating Your Own America Online Web Pages.iso / TOOLS / TEX2RTF / SOURCES.ZIP / SRC / TEX2ANY.H < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-18  |  27.5 KB  |  984 lines

  1. /*
  2.  * File:     tex2any.h
  3.  * Purpose:  Header file for LaTeX --> wxHelp conversion
  4.  *
  5.  *                       wxWindows 1.50
  6.  * Copyright (c) 1993 Artificial Intelligence Applications Institute,
  7.  *                   The University of Edinburgh
  8.  *
  9.  *                     Author: Julian Smart
  10.  *                        Date: 7-9-93
  11.  *
  12.  * Permission to use, copy, modify, and distribute this software and its
  13.  * documentation for any purpose is hereby granted without fee, provided
  14.  * that the above copyright notice, author statement and this permission
  15.  * notice appear in all copies of this software and related documentation.
  16.  *
  17.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
  18.  * IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
  19.  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  20.  *
  21.  * IN NO EVENT SHALL THE ARTIFICIAL INTELLIGENCE APPLICATIONS INSTITUTE OR THE
  22.  * UNIVERSITY OF EDINBURGH BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR
  23.  * CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM
  24.  * LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF
  25.  * DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH
  26.  * THE USE OR PERFORMANCE OF THIS SOFTWARE.
  27.  */
  28.  
  29. #include <stdio.h>
  30. #include "wx.h"
  31. #include "wx_utils.h"
  32. #include "wx_list.h"
  33. #include "wx_hash.h"
  34. #include "wxhlpblk.h"
  35.  
  36. /*
  37.  * Conversion modes
  38.  *
  39.  */
  40.  
  41. #define TEX_RTF  1
  42. #define TEX_XLP  2
  43. #define TEX_HTML 3
  44.  
  45. /*
  46.  * We have a list of macro definitions which we must define
  47.  * in advance to enable the parsing to recognize macros.
  48.  */
  49.  
  50. #define FORBID_OK         0
  51. #define FORBID_WARN       1
  52. #define FORBID_ABSOLUTELY 2
  53.  
  54. class TexMacroDef: public wxObject
  55. {
  56.  public:
  57.   int no_args;
  58.   char *name;
  59.   Bool ignore;
  60.   int forbidden;
  61.   int macroId;
  62.  
  63.   TexMacroDef(int the_id, char *the_name, int n, Bool ig, Bool forbidLevel = FORBID_OK);
  64.   ~TexMacroDef(void);
  65. };
  66.  
  67. #define CHUNK_TYPE_MACRO    1
  68. #define CHUNK_TYPE_ARG      2
  69. #define CHUNK_TYPE_STRING   3
  70.  
  71. /*
  72.  We have nested lists to represent the Tex document.
  73.  Each element of a list of chunks can be one of:
  74.   - a plain string
  75.   - a macro with/without arguments. Arguments are lists of TexChunks.
  76.  
  77. Example (\toplevel is implicit but made explicit here):
  78.  
  79. AddMacroDef(ltMYMAT, "mymat", 2);
  80.  
  81. \toplevel{The cat sat on the \mymat{very coarse and {\it cheap}}{mat}}.
  82.  
  83. Parsed as:
  84.  
  85. TexChunk: type = macro, name = toplevel, no_args = 1
  86.   Children:
  87.  
  88.     TexChunk: type = argument
  89.  
  90.       Children:
  91.         TexChunk: type = string, value = "The cat sat on the "
  92.         TexChunk: type = macro, name = mymat, no_args = 2
  93.  
  94.           Children:
  95.             TexChunk: type = argument
  96.  
  97.               Children:
  98.                 TexChunk: type = string, value = "very coarse and "
  99.                 TexChunk: type = macro, name = it, no_args = 1
  100.  
  101.                   Children:
  102.                     TexChunk: type = argument
  103.  
  104.                       Children:
  105.                         TexChunk: type = string, value = "cheap"
  106.  
  107.             TexChunk: type = argument
  108.  
  109.               Children:
  110.                 TexChunk: type = string, value = mat
  111.  */
  112.  
  113. class TexChunk
  114. {
  115.  public:
  116.   int type;
  117. //  char *name;
  118.   TexMacroDef *def;
  119.   char *value;
  120.   int macroId;
  121.   int no_args;
  122.   int argn;
  123.   Bool optional;      // Is an optional argument
  124.  
  125.   wxList children;
  126.   TexChunk(int the_type, TexMacroDef *the_def = NULL);
  127.   TexChunk(TexChunk& toCopy);
  128.   virtual ~TexChunk(void);
  129. };
  130.  
  131. extern TexChunk     *TopLevel;
  132. extern wxHashTable  MacroDefs;
  133. extern wxStringList IgnorableInputFiles; // Ignorable \input files, e.g. psbox.tex
  134.  
  135. Bool read_a_line(char *buf);
  136. Bool TexLoadFile(char *filename);
  137. int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos,
  138.            char *environment = NULL, Bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
  139. int ParseMacroBody(char *macro_name, TexChunk *parent, int no_args,
  140.            char *buffer, int pos, char *environment = NULL, Bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
  141. void TraverseDocument(void);
  142. void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, Bool childrenOnly = FALSE);
  143. #define TraverseChildrenFromChunk(arg) TraverseFromChunk(arg, NULL, TRUE)
  144. void SetCurrentOutput(FILE *fd);
  145. void SetCurrentOutputs(FILE *fd1, FILE *fd2);
  146. extern FILE *CurrentOutput1;
  147. extern FILE *CurrentOutput2;
  148. void AddMacroDef(int the_id, char *name, int n, Bool ignore = FALSE, Bool forbidden = FALSE);
  149. void TexInitialize(int bufSize);
  150. void TexCleanUp(void);
  151. void TexOutput(char *s, Bool ordinaryText = FALSE);
  152. char *GetArgData(TexChunk *chunk);
  153. char *GetArgData(void);             // Get the string for the current argument
  154. int GetNoArgs(void);                // Get the number of arguments for the current macro
  155. TexChunk *GetArgChunk(void);        // Get the chunk for the current argument
  156. TexChunk *GetTopLevelChunk(void);   // Get the chunk for the top level
  157. TexChunk *GetNextChunk(void);       // Look ahead to the next chunk
  158. Bool IsArgOptional(void);           // Is this argument an optional argument?
  159. void DefineDefaultMacros(void);     // Optional set of default macros
  160. int GetCurrentColumn(void);         // number of characters on current line
  161. extern wxPathList TexPathList;      // Path list, can be used for file searching.
  162.  
  163. // Define a variable value from the .ini file
  164. char *RegisterSetting(char *settingName, char *settingValue, Bool interactive = TRUE);
  165.  
  166. // Major document styles
  167. #define LATEX_REPORT    1
  168. #define LATEX_ARTICLE   2
  169. #define LATEX_LETTER    3
  170. #define LATEX_BOOK      4
  171. #define LATEX_SLIDES    5
  172.  
  173. extern TexChunk *DocumentTitle;
  174. extern TexChunk *DocumentAuthor;
  175. extern TexChunk *DocumentDate;
  176. extern int DocumentStyle;
  177. extern int MinorDocumentStyle;
  178. extern char *BibliographyStyleString;
  179. extern char *DocumentStyleString;
  180. extern char *MinorDocumentStyleString;
  181.  
  182. extern int normalFont;
  183. extern int smallFont;
  184. extern int tinyFont;
  185. extern int largeFont1;
  186. extern int LargeFont2;
  187. extern int LARGEFont3;
  188. extern int hugeFont1;
  189. extern int HugeFont2;
  190. extern int HUGEFont3;
  191.  
  192. /*
  193.  * USER-ADJUSTABLE SETTINGS
  194.  *
  195.  */
  196.  
  197. // Section font sizes
  198. extern int chapterFont;
  199. extern int sectionFont;
  200. extern int subsectionFont;
  201. extern int titleFont;
  202. extern int authorFont;
  203. extern Bool winHelp;  // Output in Windows Help format if TRUE, linear otherwise
  204. extern Bool isInteractive;
  205. extern Bool runTwice;
  206. extern Bool convertMode;
  207. extern Bool stopRunning;
  208. extern int  mirrorMargins;
  209. extern Bool headerRule;
  210. extern Bool footerRule;
  211. extern int labelIndentTab;  // From left indent to item label (points)
  212. extern int itemIndentTab;   // From left indent to item (points)
  213. extern Bool useUpButton;
  214. extern Bool htmlBrowseButtons;
  215. extern Bool useHeadingStyles; // Insert \s1, s2 etc.
  216. extern Bool useWord; // Insert Word table of contents, etc. etc.
  217. extern Bool indexSubsections; // put subsections in index
  218. extern Bool compatibilityMode;
  219. extern Bool generateHPJ;      // Generate WinHelp HPJ file
  220. extern char *winHelpTitle;    // Title for Windows Help file
  221. extern int defaultTableColumnWidth;
  222. extern char *bitmapMethod;
  223.  
  224. // Names to help with internationalisation
  225. extern char *ContentsNameString;
  226. extern char *GlossaryNameString;
  227. extern char *ReferencesNameString;
  228. extern char *FiguresNameString;
  229. extern char *TablesNameString;
  230. extern char *FigureNameString;
  231. extern char *TableNameString;
  232. extern char *IndexNameString;
  233. extern char *ChapterNameString;
  234. extern char *SectionNameString;
  235. extern char *SubsectionNameString;
  236. extern char *SubsubsectionNameString;
  237. extern char *UpNameString;
  238.  
  239. /*
  240.  * HTML button identifiers: what kind of browse buttons
  241.  * are placed in HTML files, if any.
  242.  *
  243.  */
  244.  
  245. #define HTML_BUTTONS_NONE       0
  246. #define HTML_BUTTONS_BITMAP     1
  247. #define HTML_BUTTONS_TEXT       2
  248.  
  249. /*
  250.  * Section numbering
  251.  *
  252.  */
  253.  
  254. extern int chapterNo;
  255. extern int sectionNo;
  256. extern int subsectionNo;
  257. extern int subsubsectionNo;
  258. extern int figureNo;
  259. extern int tableNo;
  260.  
  261. extern int ParSkip;
  262. extern int ParIndent;
  263.  
  264. extern Bool isSync;
  265.  
  266. // Set by client and by Tex2Any
  267. extern TexChunk *currentSection;
  268.  
  269. // Header/footers/pagestyle
  270. extern TexChunk *      LeftHeaderOdd;
  271. extern TexChunk *      LeftFooterOdd;
  272. extern TexChunk *      CentreHeaderOdd;
  273. extern TexChunk *      CentreFooterOdd;
  274. extern TexChunk *      RightHeaderOdd;
  275. extern TexChunk *      RightFooterOdd;
  276. extern TexChunk *      LeftHeaderEven;
  277. extern TexChunk *      LeftFooterEven;
  278. extern TexChunk *      CentreHeaderEven;
  279. extern TexChunk *      CentreFooterEven;
  280. extern TexChunk *      RightHeaderEven;
  281. extern TexChunk *      RightFooterEven;
  282. extern char *          PageStyle;
  283.  
  284. // Repeat the currentSection, either real (Chapter) or simulated (References)
  285. extern void OutputCurrentSection(void);
  286.  
  287. // Called by Tex2Any to simulate a section
  288. extern void FakeCurrentSection(char *fakeSection, Bool addToContents = TRUE);
  289.  
  290. /*
  291.  * Local to Tex2Any library
  292.  *
  293.  */
  294.  
  295. extern char *currentArgData;
  296. extern Bool haveArgData; // If TRUE, we're simulating the data.
  297. void StartSimulateArgument(char *data);
  298. void EndSimulateArgument(void);
  299.  
  300. /*
  301.  * Client-defined
  302.  *
  303.  */
  304.  
  305. // Called on start/end of macro examination
  306. void OnMacro(int macroId, int no_args, Bool start);
  307.  
  308. // Called on start/end of argument examination.
  309. // Return TRUE at the start of an argument to traverse
  310. // (output) the argument.
  311. Bool OnArgument(int macroId, int arg_no, Bool start);
  312.  
  313. // Default: library-defined
  314. void DefaultOnMacro(int macroId, int no_args, Bool start);
  315.  
  316. // Default: library-defined
  317. Bool DefaultOnArgument(int macroId, int arg_no, Bool start);
  318.  
  319. // Called on error
  320. void OnError(char *msg);
  321.  
  322. // Called for information
  323. void OnInform(char *msg);
  324.  
  325. // Special yield wrapper
  326. void Tex2RTFYield(Bool force = FALSE);
  327.  
  328. /*
  329.  * Useful utilities
  330.  *
  331.  */
  332.  
  333. // Look for \label macro, use this ref name if found or
  334. // make up a topic name otherwise.
  335. char *FindTopicName(TexChunk *chunk);
  336. void ResetTopicCounter(void);
  337.  
  338. // Parse unit eg. 14, 12pt, 34cm and return value in points.
  339. int ParseUnitArgument(char *unitArg);
  340.  
  341. // Set small, large, normal etc. point sizes for reference size
  342. void SetFontSizes(int pointSize);
  343.  
  344. /*
  345.  * Strip off any extension (dot something) from end of file,
  346.  * IF one exists. Inserts zero into buffer.
  347.  *
  348.  */
  349.  
  350. void StripExtension(char *buffer);
  351.  
  352. /*
  353.  * Reference structure
  354.  *
  355.  */
  356.  
  357. class TexRef: public wxObject
  358. {
  359.  public:
  360.   char *refLabel;      // Reference label
  361.   char *refFile;       // Reference filename (can be NULL)
  362.   char *sectionNumber; // Section or figure number (as a string)
  363.   TexRef(char *label, char *file, char *section)
  364.   {
  365.     refLabel = copystring(label);
  366.     refFile = file ? copystring(file) : NULL;
  367.     sectionNumber = section ? copystring(section) : copystring("??");
  368.   }
  369. };
  370.  
  371. extern wxHashTable TexReferences;
  372.  
  373. /*
  374.  * Add a reference
  375.  *
  376.  */
  377.  
  378. void AddTexRef(char *name, char *file = NULL, char *sectionName = NULL,
  379.          int chapter = 0, int section = 0, int subsection = 0, int subsubsection = 0);
  380.  
  381. /*
  382.  * Read and write reference file (.ref), to resolve refs for second pass.
  383.  *
  384.  */
  385. void WriteTexReferences(char *filename);
  386. void ReadTexReferences(char *filename);
  387.  
  388. /*
  389.  * Bibliography stuff
  390.  *
  391.  */
  392.  
  393. class BibEntry: public wxObject
  394. {
  395.  public:
  396.   char *key;
  397.  
  398.   /*
  399.    * book, inbook, article, phdthesis, inproceedings, techreport
  400.    */
  401.   char *type;
  402.  
  403.   /*
  404.    * Possible fields
  405.    *
  406.    */
  407.   char *editor;
  408.   char *title;
  409.   char *booktitle;
  410.   char *author;
  411.   char *journal;
  412.   char *volume;
  413.   char *number;
  414.   char *year;
  415.   char *month;
  416.   char *pages;
  417.   char *chapter;
  418.   char *publisher;
  419.   char *address;
  420.   char *institution;
  421.   char *organization;
  422.   char *comment;
  423.  
  424.   inline BibEntry(void)
  425.   {
  426.     key = NULL;
  427.     type = NULL;
  428.     editor = NULL;
  429.     title = NULL;
  430.     booktitle = NULL;
  431.     author = NULL;
  432.     journal = NULL;
  433.     volume = NULL;
  434.     number = NULL;
  435.     chapter = NULL;
  436.     year = NULL;
  437.     month = NULL;
  438.     pages = NULL;
  439.     publisher = NULL;
  440.     address = NULL;
  441.     institution = NULL;
  442.     organization = NULL;
  443.     comment = NULL;
  444.   }
  445. };
  446.  
  447. extern wxList BibList;
  448. extern wxStringList CitationList;
  449.  
  450. Bool ReadBib(char *filename);
  451. void OutputBib(void);
  452. void ResolveBibReferences(void);
  453. void AddCitation(char *citeKey);
  454. TexRef *FindReference(char *key);
  455.  
  456. /*
  457.  * Ability to customize, or at least suppress unknown macro errors
  458.  *
  459.  */
  460.  
  461. extern wxList CustomMacroList;
  462.  
  463. #define CUSTOM_MACRO_IGNORE 0
  464. #define CUSTOM_MACRO_OUTPUT 1
  465. #define CUSTOM_MACRO_MARK   2
  466.  
  467. class CustomMacro: public wxObject
  468. {
  469.  public:
  470.   char *macroName;
  471.   char *macroBody;
  472.   int noArgs;
  473.   inline CustomMacro(char *name, int args, char *body)
  474.   {
  475.     noArgs = args;
  476.     macroName = copystring(name);
  477.     if (body)
  478.       macroBody = copystring(body);
  479.     else
  480.       macroBody = NULL;
  481.   }
  482. };
  483.  
  484. Bool ReadCustomMacros(char *filename);
  485. void ShowCustomMacros(void);
  486. CustomMacro *FindCustomMacro(char *name);
  487. char *ParseMultifieldString(char *s, int *pos);
  488.  
  489. /*
  490.  * Colour table stuff
  491.  *
  492.  */
  493.  
  494. class ColourTableEntry: public wxObject
  495. {
  496.  public:
  497.   char *name;
  498.   unsigned int red;
  499.   unsigned int green;
  500.   unsigned int blue;
  501.  
  502.   ColourTableEntry(char *theName, unsigned int r,  unsigned int g,  unsigned int b);
  503.   ~ColourTableEntry(void);
  504. };
  505.  
  506. extern wxList ColourTable;
  507. extern void AddColour(char *theName, unsigned int r,  unsigned int g,  unsigned int b);
  508. extern int FindColourPosition(char *theName);
  509. extern void InitialiseColourTable(void);
  510.  
  511. #define ltABSTRACT          1
  512. #define ltADDCONTENTSLINE   2
  513. #define ltADDTOCOUNTER      3
  514. #define ltALPH1             4
  515. #define ltALPH2             5
  516. #define ltAPPENDIX          6
  517. #define ltARABIC            7
  518. #define ltARRAY             8
  519. #define ltAUTHOR            9
  520.  
  521. #define ltBACKSLASH         30
  522. #define ltBASELINESKIP      31
  523. #define ltBF                32
  524. #define ltBIBITEM           33
  525. #define ltBIBLIOGRAPHYSTYLE 34
  526. #define ltBIBLIOGRAPHY      35
  527. #define ltBOXIT             36
  528.  
  529. #define ltCAPTIONSTAR       50
  530. #define ltCAPTION           51
  531. #define ltCDOTS             52
  532. #define ltCENTERLINE        53
  533. #define ltCENTERING         54
  534. #define ltCENTER            55
  535. #define ltCEXTRACT          56
  536. #define ltCHAPTERHEADING    57
  537. #define ltCHAPTERSTAR       58
  538. #define ltCHAPTER           59
  539. #define ltCINSERT           60
  540. #define ltCITE              61
  541. #define ltCLASS             62
  542. #define ltCLEARDOUBLEPAGE   63
  543. #define ltCLEARPAGE         64
  544. #define ltCLINE             65
  545. #define ltCLIPSFUNC         66
  546. #define ltCOLUMNSEP         67
  547. #define ltCOMMENT           68
  548. #define ltCOPYRIGHT         69
  549. #define ltCPARAM            70
  550.  
  551. #define ltCHEAD             71
  552. #define ltCFOOT             72
  553.  
  554. #define ltCHAPTERHEADINGSTAR 73
  555.  
  556. #define ltDATE              90
  557. #define ltDESCRIPTION       91
  558. #define ltDESTRUCT          92
  559. #define ltDOCUMENTSTYLE     93
  560. #define ltDOCUMENT          94
  561. #define ltDOUBLESPACE       95
  562. #define ltDEFINECOLOUR      96
  563. #define ltDEFINECOLOR       97
  564.  
  565. #define ltEM                120
  566. #define ltENUMERATE         121
  567. #define ltEQUATION          122
  568. #define ltEVENSIDEMARGIN    123
  569.  
  570. #define ltFBOX              150
  571. #define ltFIGURE            151
  572. #define ltFLUSHLEFT         152
  573. #define ltFLUSHRIGHT        153
  574. #define ltFOOTHEIGHT        154
  575. #define ltFOOTNOTE          155
  576. #define ltFOOTSKIP          156
  577. #define ltFRAMEBOX          157
  578. #define ltFUNCTIONSECTION   158
  579. #define ltFUNC              159
  580. #define ltFIGURESTAR        160
  581. #define ltFOOTNOTESIZE      161
  582. #define ltFOOTNOTEPOPUP     162
  583. #define ltFANCYPLAIN        163
  584. #define ltFCOL              164
  585. #define ltBCOL              165
  586.  
  587. #define ltGLOSSARY          180
  588. #define ltGLOSS             181
  589.  
  590. #define ltHEADHEIGHT        200
  591. #define ltHELPGLOSSARY      201
  592. #define ltHELPIGNORE        202
  593. #define ltHELPONLY          203
  594. #define ltHELPINPUT         204
  595. #define ltHELPFONTFAMILY    205
  596. #define ltHELPFONTSIZE      206
  597. #define ltHELPREFN          207
  598. #define ltHELPREF           208
  599. #define ltHFILL             209
  600. #define ltHLINE             210
  601. #define ltHRULE             211
  602. #define ltHSPACESTAR        212
  603. #define ltHSPACE            213
  604. #define ltHSKIPSTAR         214
  605. #define ltHSKIP             215
  606. #define lthuge              216
  607. #define ltHuge              217
  608. #define ltHUGE              218
  609. #define ltHTMLIGNORE        219
  610. #define ltHTMLONLY          220
  611.  
  612. #define ltINCLUDEONLY       240
  613. #define ltINCLUDE           241
  614. #define ltINDEX             242
  615. #define ltINPUT             243
  616. #define ltITEMIZE           244
  617. #define ltITEM              245
  618. #define ltIMAGE             246
  619. #define ltIT                247
  620. #define ltITEMSEP           248
  621. #define ltINDENTED          249
  622.  
  623. #define ltKILL              260
  624.  
  625. #define ltLABEL             280
  626. #define ltlarge             281
  627. #define ltLarge             282
  628. #define ltLARGE             283
  629. #define ltLATEX             284
  630. #define ltLBOX              285
  631. #define ltLDOTS             286
  632. #define ltLINEBREAK         287
  633. #define ltLISTOFFIGURES     288
  634. #define ltLISTOFTABLES      289
  635. #define ltLHEAD             290
  636. #define ltLFOOT             291
  637. #define ltLATEXIGNORE       292
  638. #define ltLATEXONLY         293
  639.  
  640. #define ltMAKEGLOSSARY      300
  641. #define ltMAKEINDEX         301
  642. #define ltMAKETITLE         302
  643. #define ltMARKRIGHT         303
  644. #define ltMARKBOTH          304
  645. #define ltMARGINPARWIDTH    305
  646. #define ltMARGINPAR         306
  647. #define ltMARGINPARODD      307
  648. #define ltMARGINPAREVEN     308
  649. #define ltMBOX              309
  650. #define ltMEMBERSECTION     310
  651. #define ltMEMBER            311
  652. #define ltMULTICOLUMN       312
  653. #define ltMARGINPARSEP      313
  654.  
  655. #define ltNEWCOUNTER        330
  656. #define ltNEWLINE           331
  657. #define ltNEWPAGE           332
  658. #define ltNOCITE            333
  659. #define ltNOINDENT          334
  660. #define ltNOLINEBREAK       335
  661. #define ltNOPAGEBREAK       336
  662. #define ltNORMALSIZE        337
  663. #define ltNORMALBOX         338
  664. #define ltNORMALBOXD        339
  665. #define ltNUMBEREDBIBITEM   340
  666.  
  667. #define ltONECOLUMN         360
  668. #define ltODDSIDEMARGIN     361
  669.  
  670. #define ltPAGEBREAK         380
  671. #define ltPAGEREF           381
  672. #define ltPAGESTYLE         382
  673. #define ltPAGENUMBERING     383
  674. #define ltPARAGRAPHSTAR     384
  675. #define ltPARAGRAPH         385
  676. #define ltPARAM             386
  677. #define ltPARINDENT         387
  678. #define ltPARSKIP           388
  679. #define ltPARTSTAR          389
  680. #define ltPART              390
  681. #define ltPAR               391
  682. #define ltPFUNC             392
  683. #define ltPICTURE           393
  684. #define ltPOPREF            394
  685. #define ltPOUNDS            395
  686. #define ltPRINTINDEX        396
  687. #define ltPSBOXTO           397
  688. #define ltPSBOX             398
  689.  
  690. #define ltQUOTE             420
  691. #define ltQUOTATION         421
  692.  
  693. #define ltRAGGEDBOTTOM      440
  694. #define ltRAGGEDLEFT        441
  695. #define ltRAGGEDRIGHT       442
  696. #define ltREF               443
  697. #define ltRM                444
  698. #define ltROMAN             445
  699. #define ltROMAN2            446
  700. #define ltRTFSP             447
  701. #define ltRULE              448
  702. #define ltRULEDROW          449
  703. #define ltDRULED            450
  704. #define ltRHEAD             451
  705. #define ltRFOOT             452
  706. #define ltROW               453
  707. #define ltRTFIGNORE         454
  708. #define ltRTFONLY           455
  709.  
  710. #define ltSC                470
  711. #define ltSECTIONHEADING    471
  712. #define ltSECTIONSTAR       472
  713. #define ltSECTION           473
  714. #define ltSETCOUNTER        474
  715. #define ltSF                475
  716. #define ltSHORTCITE         476
  717. #define ltSINGLESPACE       477
  718. #define ltSLOPPYPAR         478
  719. #define ltSLOPPY            479
  720. #define ltSL                480
  721. #define ltSMALL             481
  722. #define ltSUBITEM           482
  723. #define ltSUBPARAGRAPHSTAR  483
  724. #define ltSUBPARAGRAPH      484
  725. #define ltSPECIAL           485
  726. #define ltSUBSECTIONSTAR    486
  727. #define ltSUBSECTION        487
  728. #define ltSUBSUBSECTIONSTAR 488
  729. #define ltSUBSUBSECTION     489
  730. #define ltSCRIPTSIZE        490
  731. #define ltSETHEADER         491
  732. #define ltSETFOOTER         492
  733. #define ltSIZEDBOX          493
  734. #define ltSIZEDBOXD         494
  735. #define ltSECTIONHEADINGSTAR 495
  736. #define ltSS                496
  737.  
  738. #define ltTABBING           510
  739. #define ltTABLEOFCONTENTS   511
  740. #define ltTABLE             512
  741. #define ltTABULAR           513
  742. #define ltTAB               514
  743. #define ltTEX               515
  744. #define ltTEXTWIDTH         516
  745. #define ltTEXTHEIGHT        517
  746. #define ltTHEBIBLIOGRAPHY   518
  747. #define ltTITLEPAGE         519
  748. #define ltTITLE             520
  749. #define ltTINY              521
  750. #define ltTODAY             522
  751. #define ltTOPMARGIN         523
  752. #define ltTOPSKIP           524
  753. #define ltTT                525
  754. #define ltTYPEIN            526
  755. #define ltTYPEOUT           527
  756. #define ltTWOCOLUMN         528
  757. #define ltTHEPAGE           529
  758. #define ltTHECHAPTER        530
  759. #define ltTHESECTION        531
  760. #define ltTHISPAGESTYLE     532
  761.  
  762. #define ltTWOCOLWIDTHA      533
  763. #define ltTWOCOLWIDTHB      534
  764. #define ltTWOCOLSPACING     535
  765. #define ltTWOCOLITEM        536
  766. #define ltTWOCOLITEMRULED   537
  767. #define ltTWOCOLLIST        538
  768.  
  769. #define ltUNDERLINE         550
  770.   
  771. #define ltVDOTS             570
  772. #define ltVERBATIMINPUT     571
  773. #define ltVERBATIM          572
  774. #define ltVERB              573
  775. #define ltVERSE             574
  776. #define ltVFILL             575
  777. #define ltVLINE             576
  778. #define ltVOID              577
  779. #define ltVRULE             578
  780. #define ltVSPACESTAR        579
  781. #define ltVSKIPSTAR         580
  782. #define ltVSPACE            581
  783. #define ltVSKIP             582
  784. #define ltVERBSTAR          583
  785.  
  786. #define ltWXCLIPS           600
  787. #define ltWINHELPIGNORE     601
  788. #define ltWINHELPONLY       602
  789.  
  790. #define ltXLPIGNORE         603
  791. #define ltXLPONLY           604
  792.  
  793. #define ltSPACE             620
  794. #define ltBACKSLASHCHAR     621
  795. #define ltPIPE              622
  796. #define ltFORWARDSLASH      623
  797. #define ltUNDERSCORE        624
  798. #define ltAMPERSAND         625
  799. #define ltPERCENT           626
  800. #define ltDOLLAR            627
  801. #define ltHASH              628
  802. #define ltLPARENTH          629
  803. #define ltRPARENTH          630
  804. #define ltLBRACE            631
  805. #define ltRBRACE            632
  806. #define ltEQUALS            633
  807. #define ltRANGLEBRA         634
  808. #define ltLANGLEBRA         635
  809. #define ltPLUS              636
  810. #define ltDASH              637
  811. #define ltSINGLEQUOTE       638
  812. #define ltBACKQUOTE         639
  813. #define ltTILDE             640
  814. #define ltAT_SYMBOL         641
  815.  
  816. // Characters, not macros but with special Latex significance
  817. #define ltSPECIALDOLLAR     660
  818. #define ltSPECIALDOUBLEDOLLAR 661
  819. #define ltSPECIALTILDE      662
  820. #define ltSPECIALHASH       663
  821. #define ltSPECIALAMPERSAND  664
  822. #define ltSUPERTABULAR      665
  823.  
  824. // Accents
  825. #define ltACCENT_GRAVE      700
  826. #define ltACCENT_ACUTE      701
  827. #define ltACCENT_CARET      702
  828. #define ltACCENT_UMLAUT     703
  829. #define ltACCENT_TILDE      704
  830. #define ltACCENT_DOT        705
  831. #define ltACCENT_CADILLA    706
  832.  
  833. // Symbols
  834. #define ltALPHA             800
  835. #define ltBETA              801
  836. #define ltGAMMA             802
  837. #define ltDELTA             803
  838. #define ltEPSILON           804
  839. #define ltVAREPSILON        805
  840. #define ltZETA              806
  841. #define ltETA               807
  842. #define ltTHETA             808
  843. #define ltVARTHETA          809
  844. #define ltIOTA              810
  845. #define ltKAPPA             811
  846. #define ltLAMBDA            812
  847. #define ltMU                813
  848. #define ltNU                814
  849. #define ltXI                815
  850. #define ltPI                816
  851. #define ltVARPI             817
  852. #define ltRHO               818
  853. #define ltVARRHO            819
  854. #define ltSIGMA             820
  855. #define ltVARSIGMA          821
  856. #define ltTAU               822
  857. #define ltUPSILON           823
  858. #define ltPHI               824
  859. #define ltVARPHI            825
  860. #define ltCHI               826
  861. #define ltPSI               827
  862. #define ltOMEGA             828
  863.  
  864. #define ltCAP_GAMMA         830
  865. #define ltCAP_DELTA         831
  866. #define ltCAP_THETA         832
  867. #define ltCAP_LAMBDA        833
  868. #define ltCAP_XI            834
  869. #define ltCAP_PI            835
  870. #define ltCAP_SIGMA         836
  871. #define ltCAP_UPSILON       837
  872. #define ltCAP_PHI           838
  873. #define ltCAP_PSI           839
  874. #define ltCAP_OMEGA         840
  875.  
  876. // Binary operation symbols
  877. #define ltLE                850
  878. #define ltLEQ               851
  879. #define ltLL                852
  880. #define ltSUBSET            853
  881. #define ltSUBSETEQ          854
  882. #define ltSQSUBSET          855
  883. #define ltSQSUBSETEQ        856
  884. #define ltIN                857
  885. #define ltVDASH             858
  886. #define ltMODELS            859
  887. #define ltGE                860
  888. #define ltGEQ               861
  889. #define ltGG                862
  890. #define ltSUPSET            863
  891. #define ltSUPSETEQ          864
  892. #define ltSQSUPSET          865
  893. #define ltSQSUPSETEQ        866
  894. #define ltNI                867
  895. #define ltDASHV             868
  896. #define ltPERP              869
  897. #define ltNEQ               870
  898. #define ltDOTEQ             871
  899. #define ltAPPROX            872
  900. #define ltCONG              873
  901. #define ltEQUIV             874
  902. #define ltPROPTO            875
  903. #define ltPREC              876
  904. #define ltPRECEQ            877
  905. #define ltPARALLEL          878
  906. #define ltSIM               879
  907. #define ltSIMEQ             880
  908. #define ltASYMP             881
  909. #define ltSMILE             882
  910. #define ltFROWN             883
  911. #define ltBOWTIE            884
  912. #define ltSUCC              885
  913. #define ltSUCCEQ            886
  914. #define ltMID               887
  915.  
  916. // Negated relation symbols (selected)
  917. #define ltNOTEQ             890
  918. #define ltNOTIN             891
  919. #define ltNOTSUBSET         892
  920.  
  921. // Arrows
  922. #define ltLEFTARROW         900
  923. #define ltLEFTARROW2        901
  924. #define ltRIGHTARROW        902
  925. #define ltRIGHTARROW2       903
  926. #define ltLEFTRIGHTARROW    904
  927. #define ltLEFTRIGHTARROW2   905
  928. #define ltUPARROW           906
  929. #define ltUPARROW2          907
  930. #define ltDOWNARROW         908
  931. #define ltDOWNARROW2        909
  932.  
  933. // Miscellaneous symbols
  934. #define ltALEPH             1000
  935. #define ltWP                1001
  936. #define ltRE                1002
  937. #define ltIM                1003
  938. #define ltEMPTYSET          1004
  939. #define ltNABLA             1005
  940. #define ltSURD              1006
  941. #define ltPARTIAL           1007
  942. #define ltBOT               1008
  943. #define ltFORALL            1009
  944. #define ltEXISTS            1010
  945. #define ltNEG               1011
  946. #define ltSHARP             1012
  947. #define ltANGLE             1013
  948. #define ltTRIANGLE          1014
  949. #define ltCLUBSUIT          1015
  950. #define ltDIAMONDSUIT       1016
  951. #define ltHEARTSUIT         1017
  952. #define ltSPADESUIT         1018
  953. #define ltINFTY             1019
  954.  
  955. // Binary operation symbols
  956. #define ltPM                1030
  957. #define ltMP                1031
  958. #define ltTIMES             1032
  959. #define ltDIV               1033
  960. #define ltCDOT              1034
  961. #define ltAST               1035
  962. #define ltSTAR              1036
  963. #define ltCAP               1037
  964. #define ltCUP               1038
  965. #define ltVEE               1039
  966. #define ltWEDGE             1040
  967. #define ltCIRC              1041
  968. #define ltBULLET            1042
  969. #define ltDIAMOND           1043
  970. #define ltOSLASH            1044
  971. #define ltBOX               1045
  972. #define ltDIAMOND2          1046
  973. #define ltBIGTRIANGLEDOWN   1047
  974. #define ltOPLUS             1048
  975. #define ltOTIMES            1049
  976.  
  977. // Pseudo-macros
  978. #define ltTOPLEVEL          15000
  979. #define ltCUSTOM_MACRO      15001
  980. #define ltSOLO_BLOCK        15002
  981.  
  982.  
  983.  
  984.